package star.cloud.asme.system.operation;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import star.cloud.asme.base.dto.Result;
import star.cloud.asme.base.mybatis.IBaseController;

@RestController
@RequestMapping("/system/operation")
@RequiredArgsConstructor
public class OperationController implements IBaseController<Operation> {

    private final OperationService operationService;

    @Override
    public Result<Operation> insertOne(Operation entity) {
        return operationService.insertOne(entity);
    }

    @Override
    public Result<?> physicalDeleteById(Long id) {
        return operationService.physicalDeleteById(id);
    }

    @Override
    public Result<?> logicalDeleteById(Long id) {
        return operationService.logicalDeleteById(id);
    }

    @Override
    public Result<IPage<Operation>> getListByConditionsWithPage(Operation entity) {
        return operationService.getListByConditionsWithPage(entity);
    }
}